package com.ls.pattern.structure.composite;

public class Main {
    public static void main(String[] args) {
        OrganizationComponent university = new University("清华大学", "顶级大学");
        OrganizationComponent college = new College("计算机学院", "666");
        OrganizationComponent college2 = new College("信息工程学院", "666");
        university.add(college);
        university.add(college2);
        college.add(new Department("软件工程", "不错"));
        college.add(new Department("网络工程", "不错"));
        college.add(new Department("计算机科学与技术", "不错"));
        college2.add(new Department("通讯工程", "难"));
        college2.add(new Department("信息工程", "难"));
        university.print();
    }
}
